package xyz.luhui1hao.rxjava2andretrofit2.api.http;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface ApiService {

    /**
     * @return
     */
    @POST("/")
    Observable<ResponseBody> baseUrlRequest();

    @Headers("bqs_auth:douban")
    @FormUrlEncoded
    @POST("/v2/movie/top250")
    Observable<ResponseBody> doubanRequest(@Field("start") int start, @Field("count") int count);

    @Headers("bqs_auth:douban")
    @GET("/v2/movie/top250")
    Observable<ResponseBody> doubanRequestGet(@Query("start") int start, @Query("count") int count);
}
